<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ include file="../components/screenHeader.jspf" %>

<form:form method="post" action="edit" modelAttribute="ticket">
<form:hidden path="id"/>
<form:hidden path="project.id"/>
<form:hidden path="creator.id"/>
<form:hidden path="assignee.id"/>
<table class="align-center">
<tbody>
	<tr>
		<td>Omanik:</td>
		<td>${ticket.creator}</td>
	</tr>
	<tr>
		<td>Vastutaja:</td>
		<td><select name="assignee_id" style="width: 200px;">
			<core:forEach var="user" items="${userList}">
				<option value="${user.id}"
				<core:if test="${ticket.assignee.id == user.id}"> selected="selected"</core:if>>${user}</option>
			</core:forEach>
		</select></td>
	</tr>
	<tr>
		<td>Olek:</td>
		<td><form:select path="status" cssStyle="width: 200px;">
			<form:options items="${statusList}" />
		</form:select><br />
		<form:errors cssClass="formError" path="status" /></td>
	</tr>
	<tr>
		<td>Pealkiri:</td>
		<td><form:input size="20" path="title" cssStyle="width: 100%" /><br />
			<form:errors cssClass="formError" path="title" /></td>
	</tr>
	<tr>
		<td>Kirjeldus:</td>
		<td><form:textarea size="20" path="description" cssStyle="width: 100%" /><br />
			<form:errors cssClass="formError" path="description" /></td>
	</tr>
</tbody>
</table>
<div class="ButtonsContainerBottom">
	<input type="submit" class="SubmitButton" value="Salvesta">
	<input type="reset" class="CancelButton" value="Taasta">	
</div>
</form:form>

<%@ include file="../components/screenFooter.jspf" %>
